package cn.edu.aynu.common.config;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SqlSessionTemplateConfig
{
    @Autowired
    SqlSessionFactory sqlSessionFactory;
    
    @Bean
    public SqlSessionTemplate getSqlSessionTemplate()
    {
        return new SqlSessionTemplate(sqlSessionFactory);
    }
}
